#ifndef LOGINDIALOG_H
#define LOGINDIALOG_H

#include <QDialog>
#include "accountmanager.h"
#include "sessionmanager.h"

namespace Ui {
class LoginDialog;
}

class LoginDialog : public QDialog
{
    Q_OBJECT

public:
    explicit LoginDialog(QWidget *parent = nullptr);
    ~LoginDialog();

private slots:
    void on_loginButton_clicked();

    void on_creatButton_clicked();

signals:
    void loginSuccessful(const QString& username, const QString& password);

private:
    Ui::LoginDialog *ui;
    AccountManager accountManager;  // 用于处理注册和登录逻辑

};

#endif // LOGINDIALOG_H
